package com.gy.smartmanagement.process.processdevice;

import android.os.Bundle;


import com.gy.smartmanagement.base.activity.BaseToolbarActivity;
import com.gy.smartmanagement.R;
import com.gy.smartmanagement.process.processdevice.dagger.DeviceModule;
import com.gy.smartmanagement.process.processdevice.mvp.DevicePresenter;
import com.gy.smartmanagement.utils.ActivityUtils;

import javax.inject.Inject;


/**
 * Created by MVPModule on 11/15/2019 16:36
 */
public class ProcessDeviceActivity extends BaseToolbarActivity {

  @Inject
  DevicePresenter devicePresenter;

  @Override
  public int getLayoutResId() {
    return R.layout.activity_base;
  }

  @Override
  public void initFragment(Bundle savedInstanceState) {
    setTitle("设备管理");
    ProcessDeviceFragment processDeviceFragment = ProcessDeviceFragment.newInstance();
    ActivityUtils.addFragmentToActivity(fragmentManager, processDeviceFragment, R.id.container,
        ProcessDeviceFragment.TAG);
    getApiServiceComponent().getDeviceComponent(new DeviceModule(processDeviceFragment))
        .inject(this);
  }

  public void setTitle(String title) {
    titleCenter.setText(title);
  }

  public DevicePresenter getdevicePresenter(){
    return devicePresenter;
  }

}
